//
//  XGSmallVideoModel.swift
//  TodayNews
//
//  Created by monkey on 2020/4/4.
//  Copyright © 2020 itcast. All rights reserved.
//

import HandyJSON

struct XGSmallVideoModel : HandyJSON
{
    /// 标题
    var caption: String?
    /// 观看次数
    var view_count: Int = 0
    /// 点赞次数
    var like_count: Int = 0
    /// 视频信息
    var main_mv_urls: [XGSmallVideoUrlInfo]?
    /// 用户信息
    var user: XGSmallVideoUserInfo?
    /// 覆盖图
    var avatarUrls: [XGSmallVideoUrlInfo]?
    
    mutating func mapping(mapper: HelpingMapper)
    {
        mapper <<<
        self.user <-- "soundTrack.user"
        mapper <<<
        self.avatarUrls <-- "soundTrack.avatarUrls"
    }

}

struct XGSmallVideoUserInfo: HandyJSON
{
    var user_name: String?
    var headurl: String?
}

struct XGSmallVideoUrlInfo: HandyJSON
{
    var cdn: String?
    var url: String?
}
